{include file="public/_meta" /}
<link href="__PUBLIC_ADMIN__css/plugins/footable/footable.core.css"
	rel="stylesheet">
<style>
#huiedit {
	background-color: #1ab394;
	color: #FFFFFF;
}

#huidel {
	background-color: #ed5565;
	color: #FFFFFF;
}

#hui {
	width: 50px;
	height: 50px;
}
</style>
</head>

<body class="gray-bg">
	<div class="wrapper wrapper-content animated fadeInRight">
		<div class="row">
			<div class="col-sm-12">
				<div class="ibox float-e-margins">
					<div class="ibox-title">
						<h5>联系人</h5>
						<div class="ibox-tools">
							<a href="{:url('admin/Hunanconstr/ContactsAdd')}"
								class="btn btn-primary btn-xs">新增联系人</a>
						</div>
					</div>
					<div class="ibox-content">
						<table class="footable table table-stripped toggle-arrow-tiny"
							data-page-size="50" data-filter=#filter>
							<thead>
								<tr>
									<th width="">姓名</th>
									<th width="">电话号码</th>
									<th width="">微信号码</th>
									<th>创建时间</th>
									<th>操作</th>
								</tr>
							</thead>
							<tbody>
								{foreach name="res" id="vo" key="key"}
								<tr class="gradeX">
									<td>{$vo.name}</td>
									<td>{$vo.tel}</td>
									<td>{$vo.weixin}</td>
									<td>{$vo.create_time|date="Y-m-d H:i:s",###}</td>
									<td>
										<a href="{:url('admin/Hunanconstr/ContactsEdit',['id'=>$vo.id])}"
										id="huiedit" class="btn btn-white btn-sm">编辑 </a> 
										<a onClick="return confirm('确定清除上传记录?');"
										href="{:url('admin/Hunanconstr/ContactsDel',['id'=>$vo.id])}"
										id='huidel' class="btn btn-white btn-sm">删除 </a></td>
								</tr>
								{/foreach}
							</tbody>

						</table>
					</div>
				</div>
			</div>
		</div>
	</div>

	{include file="public/_footer" /}
	<script src="__PUBLIC_ADMIN__js/plugins/footable/footable.all.min.js"></script>

	<!-- 自定义js -->
	<script src="__PUBLIC_ADMIN__js/content.js?v=1.0.0"></script>
	<script>
        $(document).ready(function() {
            $('.footable').footable();
            $('.footable2').footable();
			
            $('.refresh').click(function(){
            	window.location.reload();	// 刷新页面
            })
            
          	//iframe窗
          	$('.edit').click(function(){
          		var index = layer.open({
          			type : 2,
					fixed: true,
					scrollbar: false,
					title : '编辑',
					shadeClose : false,
					maxmin : true, //开启最大化最小化按钮
					area : ['893px', '600px'],
					//offset: '100px',
					content : '{:url("admin/admin/edit")}'
          		});
          		layer.full(index);
          	})
		});
	</script>
</body>
</html>
